﻿<%@ Page Language="C#" MasterPageFile="~/Back/BackgroundMain.master" AutoEventWireup="true"
    CodeFile="MenuManage.aspx.cs" Inherits="Back_MenuManage" Title="栏目管理" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
function show()
{
    document.getElementById("ctl00_ContentPlaceHolder1_dvChildMenu").style.visibility="visible";
}
function hidden()
{
    document.getElementById("ctl00_ContentPlaceHolder1_dvChildMenu").style.visibility="hidden";
}
function check()
{
    if(document.getElementById("").value == "")
    {
        
    }
    if(document.getElementById("").value == "")
    {
        
    }
}
    </script>

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="centertop" id="dvNav" runat="server">
                当前位置：<a href="BgArticleList.aspx">中共重庆市沙坪坝区委统一战线工作部</a>&nbsp;>>&nbsp;<a href="MenuManage.aspx">栏目管理</a></div>
            <div style="text-align: left; padding-left: 22px">
                <div class="lanmu">
                    选择栏目
                    <asp:DropDownList ID="ddlMenus" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlMenus_SelectedIndexChanged">
                    </asp:DropDownList>
                    <input type="button" onclick="javascript:show()" value="添加子栏目" class="button" />
                    <div id="dvChildMenu" runat="server" style="visibility: hidden;">
                        <span style="font-size: 12px; font-weight: bold">添加： &nbsp; 栏目编码</span>
                        <asp:TextBox runat="server" ID="txtTypeCode" Width="80px"></asp:TextBox>
                        &nbsp;&nbsp;<span style="font-size: 12px; font-weight: bold">栏目名称</span>
                        <asp:TextBox runat="server" ID="txtTypeName" Width="80px"></asp:TextBox>
                         &nbsp;&nbsp;<span style="font-size: 12px; font-weight: bold">单页面文档</span>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                        <asp:Button runat="server" ID="btnSave" Text="保存" OnClick="btnSave_Click" />
                        <input type="button" value="取消" onclick="javascript:hidden()" />
                    </div>
                </div>
                <asp:GridView ID="gv_ChildMenuList" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="#333333" GridLines="None" DataKeyNames="ID">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:BoundField DataField="TypeCode" ItemStyle-Height="25px" ItemStyle-Width="155px"
                            HeaderText="菜单编码">
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TypeName" HeaderText="菜单名称" ItemStyle-Height="25px" ItemStyle-Width="155px">
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:CommandField ButtonType="Button" EditText="编辑" HeaderText="编辑" ShowEditButton="True"
                            ShowHeader="True" CancelText="取消" UpdateText="保存" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-Width="100px">
                            <ItemStyle HorizontalAlign="Center" Width="100px" />
                        </asp:CommandField>
                        <asp:TemplateField ItemStyle-Height="25px" ItemStyle-Width="55px" HeaderText="删除">
                            <ItemTemplate>
                                <asp:Button ID="btnDelete" Text="删除" OnClientClick="javascript:return confirm('您真的要删除这个栏目吗?');"
                                    OnClick="btnDelete_Click" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Height="25px" Width="55px" />
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                    <EmptyDataTemplate>
                        此栏目暂时没有子栏目
                    </EmptyDataTemplate>
                </asp:GridView>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
